package com.campus.common.exception;

public class BusinessException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	private int code;
    private Object content;

    public BusinessException(int code, String message) {
        super(message);
        this.code = code;
    }

    public <T> BusinessException(int code, String message, T content) {
        super(message);
        this.code = code;
        this.content = content;
    }

    public BusinessException(String message) {
        this(1, message);
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
